<?php

	class Customer extends Customer_model {

		function __construct() {
			parent::__construct();
		}
                
                function validateInput() {
                    
                    if (!$this->full_name || $this->full_name == '') {
                        MessageHandler::add(EMPTY_NAME, MSG_ERROR, MESSAGE_ONLY);
                    }
                    
                    if (!$this->birth_date || $this->birth_date == '') {
                        MessageHandler::add(EMPTY_BIRTHDATE, MSG_ERROR, MESSAGE_ONLY);
                    }
                    elseif (!isValidDBDate($this->birth_date)) {
                        MessageHandler::add(INVALID_DATE, MSG_ERROR, MESSAGE_ONLY);
                    }
                    
                    if (!$this->career || $this->career == '') {
                        MessageHandler::add(EMPTY_CAREER, MSG_ERROR, MESSAGE_ONLY);
                    }
                    
                    return MessageHandler::countError() > 0 ? false : true;
                    
                }
	}
